package com.freshcity.core
{
	import com.freshcity.component.guide.GuideArrowManager;
	import com.freshcity.component.guide.GuideTipsManager;
	import com.freshcity.graphics.Background;
	import com.freshcity.manager.CommunicatorManager;
	import com.freshcity.manager.EffectManager;
	import com.freshcity.manager.LayerManager;
	import com.freshcity.manager.MsgManager;
	import com.freshcity.manager.SkinManager;
	import com.freshcity.manager.SoundManager;
	import com.pblabs.core.PBGroup;
	
	import flash.display.Sprite;
	import flash.display.Stage;
	import flash.utils.Dictionary;
	
	public class BasePage extends PBGroup
	{
		[Inject]
		public var stage:Stage;
		[Inject]
		public var layer:LayerManager;
		[Inject]
		public var skin:SkinManager;		
		[Inject]
		public var commu:CommunicatorManager;
		[Inject]
		public var soundManager:SoundManager;
		[Inject]
		public var msg:MsgManager;	
		[Inject]
		public var effect:EffectManager;			
		[Inject]
		public var guideTip:GuideTipsManager;			
		[Inject]
		public var guideArrow:GuideArrowManager;			
		
		public var rootClass:Sprite = new Sprite();
		public var settingCallback:Function;
		public var user:*;
		public var cond:*;
		
		public var friends:Dictionary=new Dictionary();
		
		public function BasePage(_name:String=null)
		{
			super(_name);
		}
		
		override public function destroy():void
		{
			LayerManager.sceneLayer.removeChild(rootClass);
			super.destroy();
		}
		
		override public function initialize():void
		{
			super.initialize();
			LayerManager.sceneLayer.addChild(rootClass);
		}
		
	}
}